package com.niiwoo.civet.user.service.local;

import com.niiwoo.civet.user.dao.entity.AuthenticationRecord;
import com.niiwoo.civet.user.dao.mapper.AuthenticationRecordMapperExt;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;

@Service
public class AuthenticationRecordLocalService {

    @Autowired
    private AuthenticationRecordMapperExt authenticationRecordMapperExt;

    @Transactional
    public AuthenticationRecord queryUserMobileAuthentication(String mobilePhone, String userId) {
        Assert.notNull(mobilePhone,"手机号不能为空");
        return authenticationRecordMapperExt.queryUserMobileAuthentication(mobilePhone,userId);
    }

    public Integer insertAuthInfo(AuthenticationRecord record) {
        return authenticationRecordMapperExt.insertSelective(record);
    }
}
